package com.wn32.main.price;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        while(true) {
            System.out.println("--------欢迎访问团购业务----------");
            System.out.println("请输入月份");
            int month = new Scanner(System.in).nextInt();
            System.out.println("请输入价格");
            double price = new Scanner(System.in).nextDouble();
            System.out.println("请输入参团人数");
            int count = new Scanner(System.in).nextInt();
            Double realPrice = 0.0;
            if (month <= 6 & month >= 1) {
                PriceService bean = MyFactory.getBean();
                realPrice = bean.getPrice16(price, count);
            } else if (month >= 7 & month <= 12) {
                PriceService bean = MyFactory.getBean();
                realPrice = bean.getPrice712(price, count);
            }
            System.out.println(realPrice);
        }
    }
}
